from MiniHeap import *

#iHeapSize = 10
#heap = Heap(iHeapSize)


'''
car = ConCar(1)
print car
cdr = ConCdr()
print cdr
s = ConCell(1,car, cdr)
print s
'''
'''
print heap
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.getConCell().debugInfo()
print heap.lAvail
#print heap[2]
'''

'''
a = [1,2]
b = [a,3]
first = new(b, heap)
print "return"
print first
obs = MarkGCObserver()
DFS(first, heap, obs)
heap.sweep()
print heap
'''

'''
a = [1,2]
b = [a,3]
first = new(b, heap)
print heap.lAvail
second = new(a, heap)
print heap.lAvail
nameTable = {"sec": second}

heap.dNameTable = nameTable
heap.mark()
print heap
print heap.lAvail
heap.sweep()
print heap
print heap.lAvail
'''

'''
a = [1,2]
b = [a,3]
c = [5,6,7,8,9]
first = new(b, heap)
second = new(a, heap)
print "after 1st new"
print heap
print heap.lAvail

nameTable = {"sec": second}
heap.dNameTable = nameTable
heap.garbageCollect()
print "after 1st gc"
print heap
print heap.lAvail

third = new(c, heap)
print "after 2nd new"
print heap
print heap.lAvail

nameTable["third"] = third
nameTable["sec"] = third
print "after 2nd gc"
heap.garbageCollect()
print heap
print heap.lAvail

third = new(c, heap)
print "after 3rd new"
print heap
print heap.lAvail

print "after 3rd gc"
nameTable["third"] = third
nameTable["sec"] = third
heap.garbageCollect()
print heap
print heap.lAvail
'''

'''
a = [1,2]
b = [3,a]
first = new(b, heap)
obs = PrintObserver()
DFS(first, heap, obs)
print "[ "+"".join(obs.sList)
'''

'''
a = [1,2]
b1 = [a,3,4]
fir = new(b1, heap)
print heap
print fir

b2 = [3,a,4]
sec = new(b2, heap)
print heap
print sec

a = [1,2]
b3 = [3,4,a]
thi = new(b3, heap)
print heap
print thi
'''


a = [1,2]
thi = {}
nameTable = {"thi": thi}
heap.setNameTable(nameTable)

b = [1,2,3,4,5,6,7,8,9,10,11]
thi = new(a, heap)
print heap
print thi



